package com.itheima.search.controller;

import com.itheima.goods.vo.ResultInfo;
import com.itheima.search.service.GoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sync")
public class SyncController {

    @Autowired
    GoodService goodService;

    @GetMapping("import_sync")
    public ResultInfo importAll(){
        goodService.goodsSync();
        return new ResultInfo(200,null,true,"操作成功");
    }
}
